import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter/material.dart';
import '../widget/my_image.dart';
class Bargain extends StatefulWidget {
  @override
  _BargainState createState() => _BargainState();
}

class _BargainState extends State<Bargain> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('砍价记录'),
        centerTitle: true,
      ),
      body: CustomScrollView(
        slivers: [
          SliverToBoxAdapter(
            child: Container(
              child: Column(
                children: [
                  Container(
                    padding: EdgeInsets.symmetric(vertical: 25.w,horizontal: 25.w),
                    child: Row(
                      children: [
                        Container(
                          width:250.w,
                          height:250.w,
                          child: ClipRRect(
                            child: MyImage(
                              imgSrc: 'https://pic.feizl.com/upload/allimg/170614/0913162K0-3.jpg',
                            ),
                          ),
                        ),
                        Column(
                          children: [
                            Text('跑步机哈哈哈打算范德萨发'),
                            RichText(
                              text: TextSpan(
                                  children: [
                                    TextSpan(
                                        text:'倒计时'
                                    ),
                                    TextSpan(
                                        text:'00'
                                    ),
                                    TextSpan(
                                        text:'天'
                                    ),
                                    TextSpan(
                                        text:'00'
                                    ),
                                    TextSpan(
                                        text:'分'
                                    ),
                                    TextSpan(
                                        text:'00'
                                    ),
                                    TextSpan(
                                        text:'秒'
                                    ),
                                  ]
                              ),
                            ),
                            RichText(
                              text: TextSpan(
                                  children: [
                                    TextSpan(
                                        text: '已砍至'
                                    ),
                                    TextSpan(
                                        text: '￥'
                                    ),
                                    TextSpan(
                                        text: '91.84'
                                    ),
                                  ]
                              ),
                            )
                          ],
                        )
                      ],
                    ),
                  ),
                  Divider(),
                  Container(
                    padding: EdgeInsets.symmetric(vertical: 25.w,horizontal: 25.w),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Text('活动已结束'),
                        FlatButton(
                          color: Colors.red,
                          onPressed: (){},
                          child: Text('重开一个',style: TextStyle(
                              color: Colors.white
                          ),),
                        )
                      ],
                    ),
                  )
                ],
              ),
            ),
          )
        ],
      ),
    );
  }
}
